package com.small.nacos.config.server.utils;

import javax.servlet.http.HttpServletResponse;

public class ResponseUtil {

    /**
     * 设置禁用缓存
     * @param response
     * @return
     */
    public static HttpServletResponse disableCache(HttpServletResponse response){
        // 设置不允许缓存
        response.setHeader("Pragma", "no-cache");
        response.setDateHeader("Expires", 0);
        response.setHeader("Cache-Control", "no-cache,no-store");
        return response;
    }
}
